<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="jquery/jquery-3.4.1.min.js"></script>
    <title>Title</title>
</head>
<body>
<h3>房间信息</h3>
<label id="u_name"></label>
<label id="r_name"></label>
<script>
    $(document).ready(function () {
        getUserInfo();
        function getUserInfo(){
            $.ajax({
                url:"user/getUserInfo",
                type:"post",
                dataType:"json",
                success:function (result) {
                    alert(JSON.stringify(result));
                    var u_name= result.object.u_name;
                    var r_name= result.object.r_name;
                    $("#u_name").text(u_name);
                    $("#r_name").text(r_name);
                }
            })
        }
    })
</script>
</body>
</html>